package com.rd.student.jiaji.class2.duyukun.Day0728;

import java.util.*;

public class Test {
    public static void main(String[] args) {

        ArrayList arrayList = new ArrayList();
        arrayList.add("石睿");
        arrayList.add("杜雨坤");
        arrayList.add("黄奕鸣");
        arrayList.add("金洪宇");
        arrayList.add("李鑫");
        arrayList.add("王宇芳");
        arrayList.add("苏岩");
        System.out.println(arrayList);
        Scanner scanner = new Scanner(System.in);
        Random random = new Random();
        int num = random.nextInt(6) + 1;
        System.out.println("随机生成的人数为：" + num);

        Collections.shuffle(arrayList);

        List arrayList1 = arrayList.subList(0,num);
        System.out.println(arrayList1);





    }
}
